require(['jquery', 'cookie', 'app', 'lay'], function ($) {
    require(['vue'], function (Vue) {
        var dic = new Vue({
            el: ".vue-box"
            , data: {
                where: [],
                that: {

                }
            }
            , created: function () {
                this.seachs();
            }
            , methods: {
                loadPage: function () {
                    var re = playAjax("bsp/38").data;
                    var toolbar = [];
                    bspVIEW($(".sa-table"), "/RepertoryController/List", re, this.where, toolbar);
                },
                seachs: function () {
                    this.where = fromName($(".el-form"));
                    debugger;
                    if(this.where['name']!=undefined){
                        this.where.shopSpec={name:this.where.name};
                    }
                    if(this.where['shopSpec']!=undefined){
                        if(this.where['shopSpec']['shop']!=undefined){
                            this.where.shopSpec.shop={name:this.where.shopSpec.shop};
                        }
                    }

                    this.loadPage();
                },
                referXadmin: function () {
                    window.location.reload();
                },
            }
        });
    })
});
function add(uuid) {
    layer.open({
        type: 2
        , content: "./14"
        , area: ["800px", "400px"]
        , btn: ['确定', '取消']
        , yes: function (index, layero) {
            var body = layer.getChildFrame('body', index);
            var w = $(layero).find("iframe")[0].contentWindow;
            var jon = w.checkSure();
            var re=playAjax("/LeaderController/AddUserCity",{users:{uuid:uuid},city:{uuid:jon['uuid']}});
            alr(re.msg);
            setTimeout(function () {
                window.reload();
            },500)

        }
        , btn2: function (index, layero) {
            layer.closeAll();
        }
        , cancel: function () {
            layer.closeAll();
        }
    });
}